<template>
  <div>
    <van-nav-bar title="房屋管理" left-arrow @click-left="onClickLeft" />
    <HouseCard :housList="houstList"></HouseCard>
  </div>
</template>

<script>
import { userHouseApi } from '@/api'
import HouseCard from '../List/houseCard.vue'
import { Toast } from 'vant'
export default {
  data () {
    return {
      houstList: []
    }
  },
  methods: {
    onClickLeft () {
      this.$router.back()
    }
  },
  async created () {
    Toast.loading({
      duration: 0,
      message: '加载中...',
      forbidClick: true
    })
    const res = await userHouseApi()
    console.log(res.data.body)
    this.houstList = res.data.body
    Toast.clear()
  },
  components: { HouseCard }
}
</script>

<style>
</style>
